package com.itheima.demo01lambda;

public class Demo03LambdaImpl {
    public static void main(String[] args) {
        // 匿名内部类在编译后会生成一个新的类.$
        goSwimming(new Swimmable() {
            @Override
            public void swimming() {
                System.out.println("这是匿名内部类的游泳");
            }
        });
    }

    // 练习无参数无返回值的Lambda
    public static void goSwimming(Swimmable swimmable){
        swimmable.swimming();
    }
}
